package com.dxy.yesas2020goals.study.partone.disignpattern.singletonpattern.hungrysingleton;

/**
 * @author victorydeng
 * @Classname HungrySingleton
 * @Description TODO 饿汉式单例
 * @Date 2020/2/28 12:02
 * @Created by victorydeng
 */
public class HungrySingleton {
  private static  final  HungrySingleton HUNGRY_SINGLETON = new HungrySingleton();
  //构造方法私有化
  private HungrySingleton () {
  }
  //提供一个全局访问点
  public static HungrySingleton getInstance(){
    return HUNGRY_SINGLETON;
  }
}
